package com.itheima.weaponhomework;

public class Test {

    public static void main(String[] args) {
        Army army = new Army(5);

        try{
            army.addWeapon(new Fighter());
            army.addWeapon(new Tank());
            army.addWeapon(new Gun());
            army.addWeapon(new TransportPlane());
            army.addWeapon(new TransportPlane());
            army.addWeapon(new TransportPlane());
            army.addWeapon(new TransportPlane());
            army.addWeapon(new TransportPlane());
        }catch(AddWeaponException e){
            System.out.println(e.getMessage());
        }

        army.moveAll();
        army.shootAll();


    }

}
